﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using WPFTrees.DataStructures;
using WPFTrees.Parser;

namespace WPFTrees.PropertyDialogs
{
    /// <summary>
    /// Interaction logic for TreePropertyDlg.xaml
    /// </summary>
    public partial class TreePropertyDlg : Window
    {
        public TreePropertyDlg(NTree<NewickNode> tree)
        {
            InitializeComponent();
            textBlockLeaves.Text = tree.Info.Leaves.Count.ToString();
            textBlockNodes.Text = tree.GetRoot().CountChildren.ToString();
            textBlockPath.Text = tree.Info.Path;
            textBlockSize.Text = string.Format("{0:F2} kB", ((double)tree.Info.Size) / 1024.0);
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }
    }
}
